<?php 
require 'dbconnect.php';

$result = mysql_query("SELECT password FROM user WHERE username" = $_POST['username']);
if(!$result){
header("location:index.php");
}
if($_POST['password'] == $result['password']){
header("location:profile.php");
}
?>

<?php session_start() ?>
<html>
<head>
	<title>Log In</title>
</head>
<body>

	<?php
	$_SESSION['fname'] = $fname;
	$_SESSION['lname'] = $lname;	
	?>
	
	
</body>
</html>